<?php 
if(!isset($_SESSION)) 
{ 
session_start(); 
} 

if (isset($_SESSION['s_searchs']) and is_array($_SESSION['s_searchs']) and isset($_REQUEST['pageNum']) and isset($_REQUEST['rows_per_page']) ) {
	
	
	$mylist = $_SESSION['s_searchs'];
	
	$pageNum = $_REQUEST['pageNum'];
	$rows_per_page = $_REQUEST['rows_per_page'];
	$pageend = $pageNum*$rows_per_page;
	$pagestart = $pageend - $rows_per_page;
	
	
	$index = 0;
	$real = 0;
	foreach ($mylist as $key =>$row){
		$index+=1;
		//$mylist[$index] = array($row[logDatetime],$row[UserID],$row[dtStart],$row[dtEnd],$row[carType],$row[carnum],$row[isReg]);				 
		if ($index<=$pagestart) {
			continue;
		}elseif ($index > $pageend){
			break;
		}
		else{$real++;
	?>
		 <tr>
		 	<td width="14%"><?=$row[0]?></td>
		 	<td width="14%"><?=$row[1]?></td>
		 	<td width="14%"><?=$row[2]?></td>
		 	<td width="14%"><?=$row[3]?></td>
		 	<td width="14%"><?=$row[4]?>&nbsp;</td>
		 	<td width="14%"><?=$row[5]?>&nbsp;</td>
		 	<td  class="last"><?=$row[6]?></td>
		 </tr> 
						 
<?php  }
	}if ($real>0 and $real<18) {
	 	foreach(range(0,18-$real) as $i){
	 		?>
	 		<tr>
		 	<td width="14%">&nbsp;</td>
		 	<td width="14%">&nbsp;</td>
		 	<td width="14%">&nbsp;</td>
		 	<td width="14%">&nbsp;</td>
		 	<td width="14%">&nbsp;</td>
		 	<td width="14%">&nbsp;</td>
		 	<td  class="last">&nbsp;</td>
		 	</tr>
	 	<?php }
	}
	
}
?>  